
import java.io.Serializable;

public class Message implements Serializable{

	private	String header;
	private String message;
	private String from;
	private String to;
	
	public Message(String header,String message){
		
		this.header = new String(header);
		this.message = new String(message);
	}
	
	
	public Message(Message m){
		
		this.header 	= new String(m.getHeader());
		this.message	= new String(m.getMessage());
		this.from 		= new String(m.getFrom());
		this.to 		= new String(m.getTo());
	}
	
	public Message(String from,String to,String header,String message){
		
		this.header 	= new String(header);
		this.message	= new String(message);
		this.from 		= new String(from);
		this.to 		= new String(to);
	}
	
	public String getMessage(){
		return this.message;
	}
	
	public String getHeader(){
		return this.header;
	}
	
	public String getFrom(){
		return this.from;
	}
	
	public String getTo(){
		return this.to;
	}
	
	public String toString(){
		return header+" : "+message;
	}
	
	public boolean equals(Message m){
	
		return this.header == m.getHeader() && this.message == m.getMessage();
	}
}
